#include "Public.h"

extern void Usart_SendChar(uint8_t data);

void LED_Init(void)
{
	RCC->APB2ENR |=RCC_APB2ENR_IOPCEN;
	GPIOC->CRH &=~(0xF<<20);
	GPIOC->CRH |=(0x3<<20);
}

	int fputc(int ch,FILE *p) 
{
 
 Usart_SendChar((u8)ch);
 
 while((USART1->SR&(1<<7)));
 
 return ch;
} 


void SysTick_Init(void)
{
	SysTick->VAL=0;
	SysTick->LOAD=79999;		//1ms
	SysTick->CTRL |=0x7;
}

